home *** CD-ROM | disk | FTP | other *** search
Wrap
; ----------------------------------------------------- ; Peace and Protection (by misspai) ; ----------------------------------------------------- ; Configurations (part 2) ; ----------------------------------------------------- ; Color scheme editor ; ----------------------------------------------------- _sample { window -c @Sample window @Sample $_winpos(0%,0%,50%,0%) @Sample %font.basic titlebar @Sample output (double-click to refresh) set %.numm 1 set %.filee $_ppdir $+ sample.txt if (%+time.stamp) set %.sts [0:00] | else unset %.sts :loop | aline -c [ $+ [ %col.base ] ] @Sample $read -l [ $+ [ %.numm ] ] %.filee | if ($_vi(.numm) < 35) goto loop } colors { window -c @ColorConfig window -l $_tabscale(20) @ColorConfig $_winpos(0%,0%,0%,50%) @ColorConfig %font.basic aline @ColorConfig (double-click to edit setting) aline @ColorConfig (double-click here to load/save color schemes) aline @ColorConfig %= set %_clr.file $_ppdir $+ configs.ini set %.clr.max $readini -n %_clr.file colors num set %.clr.num 1 :loop | _clrline %.clr.num aline | if ($_vi(.clr.num) <= %.clr.max) goto loop if ($1 != !) _sample } _clrline { set %.clr.line $readini -n %_clr.file colors $1 set %.clr.clr $gettok(%.clr.line,1,32) if (%.clr.clr == -) $2 @ColorConfig $3 %= else $2 @ColorConfig $3 $gettok(%.clr.line,3-,32) - $+ % [ $+ [ %.clr.clr ] ] $+ ò $_col2text(% [ $+ [ %.clr.clr ] ] ) ò } _clredit { if (($1 == 1) || ($1 == 3)) return if ($1 == 2) { window -c @ColorConfig | schemes ! | return } set %.clr.ini $calc($1 - 3) set %.clr.line $readini -n %_clr.file colors %.clr.ini set %.clr.clr $gettok(%.clr.line,1,32) if (%.clr.clr == -) return if ($2 == $null) { set %_clr.cmd _clredit $1 window -c @ColorSelect window -l @ColorSelect $_winpos(0%,0%,25%,25%) @ColorSelect titlebar @ColorSelect - Pick a color set %.clr.num 1 :loop aline @ColorSelect $+ $_1620(%.clr.num) $_col2text(%.clr.num) if ($_vi(.clr.num) < 17) goto loop aline @ColorSelect basic reverse aline @ColorSelect plain bold aline @ColorSelect plain underline aline @ColorSelect plain bold underline aline @ColorSelect no special coloring aline @ColorSelect 8,2 colored background set %_clr.prev 100 sline @ColorSelect 1 return } set %.clr.new $remove($2,) window -c @ColorSelect if (%.clr.clr == col.base) { set %.clr.new $gettok($remove($remove($remove($remove(%.clr.new,),),),),1,44) | if (%.clr.new == $null) set %.clr.new $colour(norm) } if ((%.clr.clr == col.custom) || (%.clr.clr == col.custdark)) { set %.clr.new $gettok($remove($remove($remove(%.clr.new,),),),1,44) | if (%.clr.new == $null) set %.clr.new $_color(norm) } set % [ $+ [ %.clr.clr ] ] %.clr.new if (%.clr.clr == col.custom) set %col.cust -c $+ $remove(%.clr.new,) if (%.clr.clr == col.custdark) set %col.cdark -c $+ $remove(%.clr.new,) set %pp.smod %col.att $+ (modified) _clrline %.clr.ini rline $1 if (fade isin %.clr.clr) _updde } _clredit2 { set %.cln $sline(@ColorSelect,1).ln set %.ctk $gettok($sline(@ColorSelect,1),1,32) if (%_clr.prev == 0) { window -c @ColorSelect window -l @ColorSelect $_winpos(0%,0%,25%,25%) @ColorSelect titlebar @ColorSelect - Pick background color set %.clr.num 1 :loop aline @ColorSelect %.ctk $+ , $+ $_1620(%.clr.num) $str($chr(160),40) $_col2text(%.clr.num) $str($chr(160),80) if ($_vi(.clr.num) < 17) goto loop set %_clr.prev 100 } elseif ((%_clr.prev < 100) || ((%.cln > 16) && (%.cln < 22))) %_clr.cmd %.ctk elseif (%.cln == 22) { titlebar @ColorSelect - Pick foreground color dline @ColorSelect 17-22 set %_clr.prev 0 } else { window -c @ColorSelect window -l @ColorSelect $_winpos(0%,0%,25%,25%) @ColorSelect titlebar @ColorSelect - Pick attribute aline -s @ColorSelect %.ctk no attribute aline @ColorSelect %.ctk $+ bold attribute aline @ColorSelect %.ctk $+ underline attribute aline @ColorSelect %.ctk $+ bold and underline attributes set %_clr.prev %.cln } } _1620 if ($1 == 16) return 00 | return $_lpad(2,0,$1) schemes { set %_clr.file $_ppdir $+ configs.ini set %_sch.file $_ppdir $+ styles.ini set %_sch.name $readini -n %_sch.file schemen %pp.scheme window -c @Schemes window -l $_tabscale(13) @Schemes $_winpos(0%,0%,0%,50%) @Schemes %font.basic aline @Schemes (double-click to select option or load scheme) aline @Schemes %= aline @Schemes Current scheme: %_sch.name %pp.smod aline @Schemes %= aline @Schemes > Edit colors in scheme < aline @Schemes > Save changes to current scheme < aline @Schemes > Save as a new scheme < aline @Schemes > Create "blank" scheme < aline @Schemes > Delete schemes < aline @Schemes > Create quick scheme < aline @Schemes %= aline @Schemes > Export P&P scheme file < aline @Schemes > Import P&P scheme file < aline @Schemes > Send color scheme via CTCP < aline @Schemes %= set %.sch.num 1 | set %.sch.paren $chr(9) $+ ( :loopie set %.sch.n $readini -n %_sch.file schemen %.sch.num if (%.sch.n != $null) { aline @Schemes %col.target $+ %.sch.num $+ > $replace(%.sch.n,$chr(40),%.sch.paren) | inc %.sch.num | goto loopie } set %_sch.next %.sch.num if ($1 != !) _sample } _schsave writeini %_sch.file schemen $1 $2- | writeini %_sch.file schemec $1 $_schsend | set %_sch.name $2- | set %pp.scheme $1 _schload { set %pp.scheme $1 set %_sch.name $readini %_sch.file schemen $1 set %.clr.send $readini %_sch.file schemec $1 set %.clr.send $_readprep(%.clr.send) set %.clr.max $readini -n %_clr.file colors num set %.clr.num 1 set %.clr.tok 1 :loop set %.clr.line $readini -n %_clr.file colors %.clr.num set %.clr.clr $gettok(%.clr.line,1,32) if (%.clr.clr != -) { set % [ $+ [ %.clr.clr ] ] $remove($gettok(%.clr.send,%.clr.tok,46),) | inc %.clr.tok } if ($_vi(.clr.num) <= %.clr.max) goto loop set %col.cust $gettok(%.clr.send,%.clr.tok,46) set %col.cdark $gettok(%.clr.send,$_vi(.clr.tok),46) return $gettok(%.clr.send,$_i(%.clr.tok),46) } _schsend { unset %.clr.send set %.clr.max $readini -n %_clr.file colors num set %.clr.num 1 :loop set %.clr.line $readini -n %_clr.file colors %.clr.num set %.clr.clr $gettok(%.clr.line,1,32) if (%.clr.clr != -) set %.clr.send %.clr.send $+ % [ $+ [ %.clr.clr ] ] $+ . if ($_vi(.clr.num) <= %.clr.max) goto loop return %.clr.send $+ %col.cust $+ . $+ %col.cdark $+ . $+ $colour(back) } _schdel set %.sliine $sline(@SchemeDelete,1).ln | if (%.sliine < 3) return | _scmsel 9 $calc(%.sliine - 2) _scmsel { if (($1 == 1) || ($1 == 2) || ($1 == 4) || ($1 == 11) || ($1 == 15)) return if ($1 == 5) { window -c @Schemes | colors ! | return } set %_arhelp _scmsel $1 if ($1 == 3) { if ($2 == $null) _pentry _arhelp $+ $_s2p(%_sch.name) New name for current scheme? set %_sch.name $2- writeini %_sch.file schemen %pp.scheme $2- rline @Schemes 3 Current scheme: $2- %pp.smod rline @Schemes $calc(15 + %pp.scheme) %col.target $+ %pp.scheme $+ > $2- } elseif ($1 == 6) { _schsave %pp.scheme %_sch.name unset %pp.smod rline @Schemes 3 Current scheme: %_sch.name (changes saved) } elseif ($1 == 7) { if ($2 == $null) _askr _arhelp Name for new scheme? _schsave %_sch.next $2- unset %pp.smod rline @Schemes 3 Current scheme: %_sch.name aline @Schemes %col.target $+ %_sch.next $+ > %_sch.name inc %_sch.next } elseif ($1 == 8) { if ($2 == $null) _askr _arhelp Name for new scheme? set %.clr.max $readini -n %_clr.file colors num set %.clr.num 1 :loopah set %.clr.line $readini -n %_clr.file colors %.clr.num set %.clr.clr $gettok(%.clr.line,1,32) if (%.clr.clr != -) set % [ $+ [ %.clr.clr ] ] if ($_vi(.clr.num) <= %.clr.max) goto loopah set %col.custom $_color(norm) set %col.custdark $_color(norm) set %col.cust -c $+ $colour(norm) set %col.cdark -c $+ $colour(norm) set %col.base $colour(norm) _schsave %_sch.next $2- unset %pp.smod rline @Schemes 3 Current scheme: %_sch.name aline @Schemes %col.target $+ %_sch.next $+ > %_sch.name inc %_sch.next _updde if ($_isopen(@Sample)) _sample } elseif ($1 == 9) { if ($2 == $null) { window -c @SchemeDelete window -l @SchemeDelete $_winpos(0%,0%,25%,25%) @SchemeDelete aline @SchemeDelete Double-click on scheme to delete (close when finished) aline @SchemeDelete %= set %.sch.num 1 :loopie set %.sch.n $readini -n %_sch.file schemen %.sch.num if (%.sch.n != $null) { aline @SchemeDelete %col.target $+ %.sch.num $+ > %.sch.n | inc %.sch.num | goto loopie } set %_sch.next %.sch.num return } if ($2 == %pp.scheme) _error You cannot delete the current color scheme if ($2 == $_j(%_sch.next)) { dec %_sch.next remini %_sch.file schemen $2 remini %_sch.file schemec $2 dline @Schemes $line(@Schemes,0) dline @SchemeDelete $line(@SchemeDelete,0) } else { set %.oldnum %pp.scheme _schsave %_sch.next %_sch.name _schload $_j(%_sch.next) _schsave $2 %_sch.name set %.thename %_sch.name _schload %_sch.next set %pp.scheme %.oldnum remini %_sch.file schemen %_sch.next remini %_sch.file schemec %_sch.next dec %_sch.next remini %_sch.file schemen %_sch.next remini %_sch.file schemec %_sch.next rline @Schemes $calc(15 + $2) %col.target $+ $2 $+ > %.thename rline @SchemeDelete $calc(2 + $2) %col.target $+ $2 $+ > %.thename dline @Schemes $line(@Schemes,0) dline @SchemeDelete $line(@SchemeDelete,0) } } elseif ($1 == 10) { if ($2 == $null) _askr _arhelp Name for new scheme? set %_sch.qname $2- unset %_sch.quick window -c @ColorSelect window -l @ColorSelect $_winpos(0%,0%,25%,25%) @ColorSelect2 titlebar @ColorSelect - Pick a color aline @ColorSelect Select your main event color (color 1 of 4) aline @ColorSelect %= set %.clr.num 1 :loop aline @ColorSelect $+ $_1620(%.clr.num) $_col2text(%.clr.num) if ($_vi(.clr.num) < 17) goto loop } elseif ($1 == 12) { if ($2 == $null) _askr _arhelp Filename to save scheme to? write -c $_wrapfile($2-) P&P color scheme file A - %_sch.name set %.clr.max $readini -n %_clr.file colors num set %.clr.num 1 :looper set %.clr.line $readini -n %_clr.file colors %.clr.num set %.clr.clr $gettok(%.clr.line,1,32) if (%.clr.clr != -) { set %.todd % [ $+ [ %.clr.clr ] ] | if (%.todd == $null) write $_wrapfile($2-) x | else write $_wrapfile($2-) $replace($replace($replace($replace(%.todd,,K),,B),,U),,R) } if ($_vi(.clr.num) <= %.clr.max) goto looper write $_wrapfile($2-) %col.cust %col.cdark $colour(back) disps Color scheme " $+ %col.info1 $+ %_sch.name $+ " saved to %col.target $+ $2- | _recfile2 $2- } elseif ($1 == 13) { _timer924off set %.clr.got $dir="Scheme file to import?" [ [ $mircdir ] $+ ] *.* _timer924on if ((%.clr.got == $null) || (* isin %.clr.got)) return set %.clr.ver $read -nl1 $_wrapfile(%.clr.got) set %.clr.match P&P color scheme file if ($gettok(%.clr.ver,1-4,32) != %.clr.match) _error File is not a recognized P&P color scheme file if ($gettok(%.clr.ver,5,32) != A) _error File is from a later version of P&P and is not importable set %_sch.name $gettok(%.clr.ver,7-,32) _schsave %_sch.next %_sch.name set %.clr.max $readini -n %_clr.file colors num set %.clr.num 1 set %.clr.linett 2 :looper set %.clr.line $readini -n %_clr.file colors %.clr.num set %.clr.clr $gettok(%.clr.line,1,32) if (%.clr.clr != -) { set %.clr.read $read -nl [ $+ [ %.clr.linett ] ] $_wrapfile(%.clr.got) if (%.clr.read == x) set % [ $+ [ %.clr.clr ] ] else set % [ $+ [ %.clr.clr ] ] $replace($replace($replace($replace(%.clr.read,K,),B,),U,),R,) inc %.clr.linett } if ($_vi(.clr.num) <= %.clr.max) goto looper set %.clr.read $read -nl [ $+ [ %.clr.linett ] ] $_wrapfile(%.clr.got) set %col.cust $gettok(%.clr.read,1,32) set %col.cdark $gettok(%.clr.read,2,32) set %.sbk $gettok(%.clr.read,3,32) unset %pp.smod rline @Schemes 3 Current scheme: %_sch.name aline @Schemes %col.target $+ %_sch.next $+ > %_sch.name _schsave %_sch.next %_sch.name inc %_sch.next _updde if ($_isopen(@Sample)) _sample if (%.sbk != $colour(back)) { window -c @Warning window @Warning $_center(500,110) 500 110 @Close %font.quick echo $colour(norm) @Warning Warning- This scheme was designed using a $_col2text(%.sbk) $+ %.sbk $+ (this color) background color. You may have to change your background color (Alt+K for mIRC colors) to view it properly. } } elseif ($1 == 14) { if ($2 == $null) _askr _arhelp Nickname to send scheme to? ctcpreply $2 P&PCOLORS A $_schsend %_sch.name } else { set %.sbk $_schload($calc($1 - 15)) unset %pp.smod rline @Schemes 3 Current scheme: %_sch.name _updde if ($_isopen(@Sample)) _sample if (%.sbk != $colour(back)) { window -c @Warning window @Warning $_center(500,110) 500 110 @Close %font.quick echo $colour(norm) @Warning Warning- This scheme was designed using a $_col2text(%.sbk) $+ %.sbk $+ (this color) background color. You may have to change your background color (Alt+K for mIRC colors) to view it properly. } } } _schget { set %.sch.num 1 set %_sch.file $_ppdir $+ styles.ini :loopie set %.sch.n $readini -n %_sch.file schemen %.sch.num if (%.sch.n != $null) { inc %.sch.num | goto loopie } writeini %_sch.file schemen %.sch.num $2- | writeini %_sch.file schemec %.sch.num $1 dispa Color scheme " $+ %col.info1 $+ $2- $+ " saved } _schquick { set %.ln $sline(@ColorSelect,1).ln if (%.ln < 3) return set %_sch.quick %_sch.quick $_1620($calc(%.ln - 2)) set %.nx $_numtok(32,%_sch.quick) if (%.nx == 1) rline @ColorSelect 1 Select your secondary color, darker or highlighted (color 2 of 4) elseif (%.nx == 2) rline @ColorSelect 1 Select your warning color, for alerts and etc. (color 3 of 4) elseif (%.nx == 3) rline @ColorSelect 1 Select the main color for your popup windows (color 4 of 4) else { window -c @ColorSelect set %.bk $colour(back) set %.fade0 0 14 12 9 7 4 13 8 8 9 11 11 11 13 15 15 set %.fade1 14 1 2 2 5 5 2 5 4 3 2 10 2 6 14 14 set %.fade2 1 14 15.0 15 14.0 12 12.0 9 9.0 8 7.0 7 4.0 13 13.0 8 8.1 4 7.1 3 3.0 11 11.1 10 10.0 11 11.1 6 6.0 15 15.1 14 14 set %.fade $gettok(%.fade2,$_i(%.bk),46) if ($gettok(%.fade,1,32) == 1) set %.fade3 %.fade1 else set %.fade3 %.fade0 set %.main $gettok(%_sch.quick,1,32) set %.fade %.main $gettok(%.fade3,$_i(%.main),32) %.fade set %_sch.quick %_sch.quick $colour(norm) %.bk $+ , $+ $gettok(%_sch.quick,2,32) %.fade set %.clr.max $readini -n %_clr.file colors num set %.clr.num 1 :loopah set %.clr.line $readini -n %_clr.file colors %.clr.num set %.clr.clr $gettok(%.clr.line,1,32) if (%.clr.clr != -) { set %.clr.tok $gettok(%.clr.line,2,32) if (B isin %.clr.tok) { set %.clr.done | set %.clr.tok $remove(%.clr.tok,B) } elseif (U isin %.clr.tok) { set %.clr.done | set %.clr.tok $remove(%.clr.tok,U) } else unset %.clr.done set % [ $+ [ %.clr.clr ] ] $+ $gettok(%_sch.quick,%.clr.tok,32) $+ %.clr.done } if ($_vi(.clr.num) <= %.clr.max) goto loopah set %col.cust -c $+ $remove(%col.custom,,,) set %col.cdark -c $+ $remove(%col.custdark,,,) set %col.base $remove(%col.base,,,) _schsave %_sch.next %_sch.qname unset %pp.smod rline @Schemes 3 Current scheme: %_sch.name aline @Schemes %col.target $+ %_sch.next $+ > %_sch.name inc %_sch.next _updde if ($_isopen(@Sample)) _sample } } ; ----------------------------------------------------- ; Fonts ; ----------------------------------------------------- fonts { window -c @BasicFont | window -c @FixedFont | window -c @PopupFont window -c @BasicSample | window -c @FixedSample | window -c @PopupSample window -l @BasicFont $_winpos(35%,0%,0%,67%) /_fontsel @Fonts %font.basic window -l @PopupFont $_winpos(35%,0%,33%,34%) /_fontsel @Fonts %font.basic window -l @FixedFont $_winpos(35%,0%,66%,0%) /_fontsel @Fonts %font.basic window -l @BasicSample $_winpos(0%,65%,0%,67%) @Fonts %font.basic window -l @PopupSample $_winpos(0%,65%,33%,34%) @Fonts %font.quick window -l -t [ $+ [ $_j(%font.fixtab) ] ] @FixedSample $_winpos(0%,65%,66%,0%) @Fonts %font.basic aline @BasicFont Font used for most P&P windows aline @BasicFont Currently: %font.basic aline @PopupFont Font used for quick popup windows aline @PopupFont Currently: %font.quick aline @FixedFont Width of tabs in windows aline @FixedFont Currnetly: %font.fixtab aline @FixedFont (double-click to select option) aline @FixedFont %= aline @FixedFont Increase size by 5 aline @FixedFont Decrease size by 5 aline @FixedFont %= aline @FixedFont Increase size by 1 aline @FixedFont Decrease size by 1 aline @FixedFont %= aline @FixedFont The tab should be wide enough so none of the aline @FixedFont preceding text is overwritten, but not so wide aline @FixedFont that there is an abundance of extra space. aline @FixedSample This is a sample option: ON aline @FixedSample None of this should be cut off: OFF aline @FixedSample Size the extra space to taste: 123 set %.numm 1 set %.filee $_ppdir $+ fontopt.txt :loop1 set %.linee $read -l [ $+ [ %.numm ] ] %.filee aline @BasicFont %.linee aline @PopupFont %.linee if ($_vi(.numm) < 8) goto loop1 set %.filee $_ppdir $+ styles.ini set %.numm 1 :loop3 set %.linee $readini -n %.filee vfont %.numm if (%.linee != $null) { aline @BasicFont %.linee | aline @PopupFont %.linee | inc %.numm | goto loop3 } set %.numm 1 set %.filee $_ppdir $+ fontsamp.txt :loop4 set %.linee $read -l [ $+ [ %.numm ] ] %.filee aline @BasicSample %.linee aline @PopupSample %.linee if ($_vi(.numm) < 6) goto loop4 } _fredraw { set %.wname $1 $+ Font rline %.wname 2 Currently: % [ $+ [ $2 ] ] set %.wname $1 $+ Sample window -c %.wname if ($1 == @Basic) set %.wpos $_winpos(0%,65%,0%,67%) elseif ($1 == @Popup) set %.wpos $_winpos(0%,65%,33%,34%) else set %.wpos $_winpos(0%,65%,66%,0%) if ($1 == @Fixed) window -l -t [ $+ [ $_j(%font.fixtab) ] ] @FixedSample $_winpos(0%,65%,66%,0%) @Fonts %font.basic else window -l %.wname %.wpos @Fonts % [ $+ [ $2 ] ] if ($1 == @Fixed) { aline @FixedSample This is a sample option: ON aline @FixedSample None of this should be cut off: OFF aline @FixedSample Size the extra space to taste: 123 window -b @FixedSample } else { set %.numm 1 set %.filee $_ppdir $+ fontsamp.txt :loop | aline %.wname $read -l [ $+ [ %.numm ] ] %.filee | if ($_vi(.numm) < 6) goto loop } } _fontsel { set %.win $active set %.ln $sline(%.win,1).ln if (Basic isin %.win) set %.font font.basic elseif (Popup isin %.win) set %.font font.quick else { set %.old %font.fixtab if (%.ln == 5) inc %.old 5 elseif (%.ln == 6) dec %.old 5 elseif (%.ln == 8) inc %.old elseif (%.ln == 9) dec %.old else return if (%.old > 50) set %.old 50 elseif (%.old < 5) set %.old 5 set %font.fixtab %.old _fredraw $remove(%.win,Font) font.fixtab return } if ((%.ln < 5) || (%.ln == 7) || (%.ln == 9)) return set %.old % [ $+ [ %.font ] ] set %.oldsize $_rtok(1,32,%.old) if (%.ln < 7) { set %.newsize %.oldsize if (%.ln == 5) inc %.newsize else dec %.newsize if ((%.newsize < 4) || (%.newsize > 99)) return set % [ $+ [ %.font ] ] $remtok(%.old,%.oldsize,32) %.newsize _fredraw $remove(%.win,Font) %.font if (Basic isin %.win) _fredraw @Fixed font.fixtab } elseif (%.ln == 8) { if ($1 == $null) _askr _fontsel EXACT name of font? (press Alt+V to get a list of available fonts) set % [ $+ [ %.font ] ] $1- %.oldsize _fredraw $remove(%.win,Font) %.font if (Basic isin %.win) _fredraw @Fixed font.fixtab } else { set % [ $+ [ %.font ] ] $line(%.win,%.ln) %.oldsize _fredraw $remove(%.win,Font) %.font if (Basic isin %.win) _fredraw @Fixed font.fixtab } } ; ----------------------------------------------------- ; Display elements ; ----------------------------------------------------- _sepline { set %.ffff $_ppdir $+ styles.ini set %.line1 $readini -n %.ffff lineshade $1 if ($2 isnum) { set %.line2 $readini -n %.ffff lineshade o set %.line2 $gettok(%.line2,$2,44) } else set %.line2 $2 $+ $2 set %.tored $replace($replace(%.line1,o,$left(%.line2,1)),s,$right(%.line2,1)) if (%col.fade1 == $null) set %.tored $remove(%.tored,A) else set %.tored $replace(%.tored,A,%col.fade1) if (%col.fade2 == $null) set %.tored $remove(%.tored,B) else set %.tored $replace(%.tored,B,%col.fade2) if (%col.fade3 == $null) set %.tored $remove(%.tored,C) else set %.tored $replace(%.tored,C,%col.fade3) if (%col.fade4 == $null) set %.tored $remove(%.tored,D) else set %.tored $replace(%.tored,D,%col.fade4) if (%col.fade5 == $null) set %.tored $remove(%.tored,E) else set %.tored $replace(%.tored,E,%col.fade5) return %.tored } _logos { set %.ffff $_ppdir $+ styles.ini if ($1 isnum) set %.logos $readini -n %.ffff logo $1 else set %.logos $1 set %.numi 1 unset %.ret :loop set %.tok $gettok(%.logos,%.numi,44) set %.ret %.ret $2 $+ %col.fade3 $+ $left(%.tok,1) $+ %col.fade2 $+ $mid(%.tok,2,$calc($len(%.tok) - 2)) $+ %col.fade1 $+ $right(%.tok,1) $+ if ($_vi(.numi) < 5) goto loop return %.ret $2 $+ $gettok(%.logos,5,44) } elements { _ele4 ! window -c @Brackets | window -c @Logos window -l @Brackets $_winpos(0%,50%,70%,0%) /_ele2 @Elements %font.basic window -l @Logos $_winpos(50%,0%,70%,0%) /_ele3 @Elements %font.basic aline @Brackets Double-click to select bracket style aline @Brackets Current- %[ $+ example $+ %] aline @Brackets $chr(160) aline @Logos Double-click to select logo styles aline @Logos Current- %@ %@c %@w %@s %! aline @Logos $chr(160) set %.num 1 :loop2 set %.brak $readini -n %.ffff bracket %.num aline @Brackets $replace($replace($replace(%.brak,$chr(44),sample text),B,),U,) if ($_vi(.num) < 9) goto loop2 aline @Brackets Custom... set %.num 1 :loop3 aline @Logos $_logos(%.num) aline @Logos $_logos(%.num,) if ($_vi(.num) < 6) goto loop3 aline @Logos Single custom... aline @Logos Complex custom... } _ele1 { set %.ln $sline(@Seperator,1).ln if (%.ln == 2) { window -c @Seperator window -l @Seperator $_winpos(0%,0%,0%,30%) /_ele4 @Elements %font.basic aline @Seperator Double-click to select a line style (Current- %pp.lineset $+ ) aline @Seperator Double-click here to select a shading style aline @Seperator $chr(160) set %.num 1 :loop1 aline @Seperator %.num $+ ) $_sepline(%pp.lineshade,%.num) if ($_vi(.num) < 11) goto loop1 aline @Seperator Custom... return } if (%.ln < 4) return set %pp.lineshade $calc(%.ln - 3) rline @Seperator 1 Double-click to select a shading style (Current- %pp.lineshade $+ ) set %= $_sepline(%pp.lineshade,%pp.lineset) } _ele4 { if ($1 == !) set %.ln 2 else set %.ln $sline(@Seperator,1).ln if (%.ln == 2) { window -c @Seperator window -l @Seperator $_winpos(0%,0%,0%,30%) /_ele1 @Elements %font.basic aline @Seperator Double-click to select a shading style (Current- %pp.lineshade $+ ) aline @Seperator Double-click here to select a line style aline @Seperator $chr(160) set %.num 1 :loop1 aline @Seperator %.num $+ ) $_sepline(%.num,%pp.lineset) if ($_vi(.num) < 16) goto loop1 return } if (%.ln < 4) return if (%.ln == 14) { if ($1 == $null) _askr _ele4 Character to use for line seperator? set %pp.lineset $left($1,1) } else set %pp.lineset $calc(%.ln - 3) rline @Seperator 1 Double-click to select a line style (Current- %pp.lineset $+ ) set %= $_sepline(%pp.lineshade,%pp.lineset) } _ele2 { set %.ln $sline(@Brackets,1).ln if (%.ln < 4) return if (%.ln == 12) { if ($1 == $null) _askr _ele2 Left bracket? (including any control codes) if ($2 == $null) { set %_arhelp _ele2 $1 | _askr _arhelp Right bracket? (including any control codes) } set %[ $1 | set %] $2 goto domid } set %.ffff $_ppdir $+ styles.ini set %.brak $readini -n %.ffff bracket $calc(%.ln - 3) set %.brak $replace($replace(%.brak,B,),U,) set %[ $gettok(%.brak,1,44) set %] $gettok(%.brak,2,44) :domid set %: if ($calc($count(%[,) % 2) == 1) set %: if ($calc($count(%[,) % 2) == 1) set %: %: $+ if ($calc($count(%[,) % 2) == 1) set %: %: $+ if ( isin %[) { set %.tmp a $+ %[ set %.col $gettok(%.tmp,2,3) set %.col $left(%.col,2) if (%.col isnum) set %: %: $+ $+ %.col else set %: %: $+ $+ $left(%.col,1) } if ($calc($count(%[,) % 2) != $calc($count(%],) % 2)) set %] %] $+ elseif ($calc($count(%[,) % 2) != $calc($count(%],) % 2)) set %] %] $+ elseif ($calc($count(%[,) % 2) != $calc($count(%],) % 2)) set %] %] $+ elseif (( isin %[) && ( !isin %])) set %] %] $+ rline @Brackets 2 Current- %[ $+ example $+ %] } _ele3 { set %.ln $sline(@Logos,1).ln if (%.ln < 4) return if (%.ln == 14) { if ($1 == $null) _askr _ele3 Custom logo to show before all P&P lines? (3 characters recommended, no spaces) if ($left($1,1) == ) { set %.logos $_rchop(1,$1) | set %.char } else { set %.logos $1 | unset %.char } set %pp.logoset %.logos $+ , $+ %.logos $+ , $+ %.logos $+ , $+ %.logos $+ , $+ %.logos %.char } elseif (%.ln == 15) { set %_arhelp _ele3 $1- if ($1 == $null) _askr _ele3 Basic logo for most P&P events? (logo 1 of 5, don't use spaces) elseif ($2 == $null) _askr _arhelp Logo for CTCP events? (logo 2 of 5, don't use spaces) elseif ($3 == $null) _askr _arhelp Logo for whois replies/IRCop wallops? (logo 3 of 5, don't use spaces) elseif ($4 == $null) _askr _arhelp Logo for server notices? (logo 4 of 5, don't use spaces) elseif ($5 == $null) _askr _arhelp Logo for warnings/alerts? (logo 5 of 5, don't use spaces) set %.logos $_s2c($1-) if ($left($1,1) == ) { set %.rep , | set %pp.logoset $replace($_rchop(%.logos),%.rep,$chr(44)) } else set %pp.logoset %.logos } else { set %pp.logoset $calc(%.ln - 3) if ($calc(%pp.logoset % 2) == 0) set %pp.logoset $int($calc((%pp.logoset + 1) / 2)) else set %pp.logoset $calc((%pp.logoset + 1) / 2) } set %.logos $_logos(%pp.logoset) rline @Logos 2 Current- %.logos set %@ $gettok(%.logos,1,32) set %@c $gettok(%.logos,2,32) set %@w $gettok(%.logos,3,32) set %@s $gettok(%.logos,4,32) set %! $gettok(%.logos,5,32) } _updde { set %.logos $_logos(%pp.logoset) set %@ $gettok(%.logos,1,32) set %@c $gettok(%.logos,2,32) set %@w $gettok(%.logos,3,32) set %@s $gettok(%.logos,4,32) set %! $gettok(%.logos,5,32) set %= $_sepline(%pp.lineshade,%pp.lineset) }